<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>海域信息修改</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="css/font_eolqem241z66flxr.css" media="all" />

</head>
<body class="childrenBody">
<blockquote class="layui-elem-quote" style="border-left: 5px solid #ffffff">
    <fieldset class="layui-elem-field">
        <legend>海域信息修改</legend>
        <div class="layui-field-box">

            <a href="sea">
                <button class="layui-btn" style="background-color: #1E9FFF">返回上一级</button>
            </a>

        </div>
    </fieldset>
</blockquote>
<form class="layui-form">

    <div class="layui-form-item">
        <label class="layui-form-label">海域编号</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input seaId" name="seaId" lay-verify="required" placeholder="请输入海域编号" value="${sea.seaId}">
        </div>

        <label class="layui-form-label">海域名称</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input seaName" name="seaName" lay-verify="required" placeholder="请输入海域名称" value="${sea.seaName}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">事故编号</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input accidentId" name="accidentId" lay-verify="required" placeholder="请输入事故编号" value="${sea.accidentId}">
        </div>

        <label class="layui-form-label">事故名称</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input accidentName" name="accidentName" lay-verify="required" placeholder="请输入事故名称" value="${sea.accidentName}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">经度</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input lng" name="lng" value="${sea.lng}">
        </div>

        <label class="layui-form-label">纬度</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input lat" name="lat" value="${sea.lat}" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">事故比例</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input scale" name="scale" value="${sea.scale}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">不利条件</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入海域不利条件" id="disadvantage" name="disadvantage" class="layui-textarea">
             ${sea.disadvantage}
            </textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="revise_Sea">确认修改</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="layui/layui.all.js"></script>
<script src="layui/layui.js"></script>

<script type="text/javascript">
	layui.use(['form','layer','jquery','layedit','laydate'], function(){
	  var form = layui.form,
      layer = parent.layer === undefined ? layui.layer : parent.layer,
      laypage = layui.laypage,
      layedit = layui.layedit,
      laydate = layui.laydate,
      $ = layui.jquery;
	  
	  //监听提交
      form.on('submit(revise_Sea)', function(data) {
          var index = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
          $.ajax({
          	contentType:'application/x-www-form-urlencoded; charset=UTF-8',
          	url : "sea/reviseSea",
          	type : "post",
          	data : data.field,
          	dataType : "json"
          })
          //弹出loading
          var index = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
          setTimeout(function(){
              top.layer.close(index);
              top.layer.msg("信息修改成功！");
              layer.closeAll("iframe");
              //刷新父页面
              parent.location.reload();
          },2000);
          return false;
      })
	  
	});
</script>
</body>
</html>